package com.jdbc.dataAccess;
/**
 *
 * @author Baron
 */
public class ConnectionSettings {
    
    private String user;
    private String password;
    private String database;
    private String dbms;
    private String serverName;
    private String port;
    private String connectionString;
    private String url;
    
    private String driver;
    
    public ConnectionSettings(String user,String password,String database,String dbms,String serverName,String port){
    
        if (dbms == null) throw new IllegalArgumentException("dmbs must be set");
        if (serverName == null) throw new IllegalArgumentException("serverName must be set");
        if (port == null) throw new IllegalArgumentException("port must be set");
        if (database == null) throw new IllegalArgumentException("database must be set");
        
        this.user = user;
        this.password = password;
        this.database = database;
        this.dbms = dbms;
        this.serverName = serverName;
        this.port = port;
        
    }
    
   // public ConnectionSettings(String connectionString){
                      
         //ConnectionSettings con =  ConnectionHelper.//ConnectionHelper.getConnectionSettings(connectionString);
         //this.database = con.getDatabase();
    //}
    
    public ConnectionSettings(){}
    
    @Override
    public String toString(){
            return connectionString;
    }

      public String getDriver() {
            return driver;
      }

      public void setDriver(String driver) {
            this.driver = driver;
      }

    
      public String getUrl() {
            return url;
      }

      public void setUrl(String url) {
            this.url = url;
      }
    
      public String getConnectionString() {
            return connectionString;
      }

      public void setConnectionString(String connectionString) {
            this.connectionString = connectionString;
      }
      
    public String getDatabase() {
        return database;
    }

    public void setDatabase(String database) {
        this.database = database;
    }
    
    public String getDbms() {
        return dbms;
    }

    public void setDbms(String dbms) {
        this.dbms = dbms;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getServerName() {
        return serverName;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }
    
}
